package com.tristen.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tristen.common.utils.PageUtils;
import com.tristen.gulimall.product.entity.AttrEntity;
import com.tristen.gulimall.product.entity.AttrGroupEntity;
import com.tristen.gulimall.product.vo.AttrGroupAndAttrVo;
import com.tristen.gulimall.product.vo.AttrGroupRelationVo;
import com.tristen.gulimall.product.vo.SpuItemAttrGroupVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author gx
 * @email 2519294308@qq.com
 * @date 2021-09-05 21:07:00
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 【属性分组】 -查询某个分类下的分组信息 列表
     * @param params
     * @param catelogId
     * @return
     */
    PageUtils queryPageByCid(Map<String, Object> params, Long catelogId);

    List<AttrEntity> getAttrByAttrGroupId(Long attrgroupId);

    void deleteRelation(AttrGroupRelationVo[] attrGroupRelationVo);

    PageUtils getNoRelation(Long attrgroupId, Map<String, Object> params);

    List<AttrGroupAndAttrVo> getGroupAndAttr(Long catelogId);

    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}

